Skip to content

add retain namespace scc checkbox in the dr enrollment - #2794

Merged
openshift-merge-bot[bot] merged 1 commit into
red-hat-storage:masterfrom
Harshvardhan-handa123:scc-annotation-dr-enrollment
May 27, 2026
Merged

add retain namespace scc checkbox in the dr enrollment#2794
openshift-merge-bot[bot] merged 1 commit into
red-hat-storage:masterfrom
Harshvardhan-handa123:scc-annotation-dr-enrollment

Conversation

@Harshvardhan-handa123

@Harshvardhan-handa123 Harshvardhan-handa123 commented May 12, 2026

Copy link
Copy Markdown
Contributor

JIRA Bug: https://redhat.atlassian.net/browse/DFBUGS-6239

SS:

Enroll discovered Application flow:
if retainNamespaceSCCAcrossPeers flag is false:
image

if true:
image

Enroll Managed Application flow:
image

@SanjalKatiyar
SanjalKatiyar requested a review from vbnrh May 19, 2026 07:50

@asn1809 asn1809 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@openshift-ci

openshift-ci Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

@asn1809: changing LGTM is restricted to collaborators

Details

In response to this:

lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@Harshvardhan-handa123
Harshvardhan-handa123 force-pushed the scc-annotation-dr-enrollment branch 3 times, most recently from ff64ac9 to 262a8c7 Compare May 19, 2026 08:40
<Checkbox
id="Namespace-scc"
label={t(
'Use Same Namespace Security Context Constraints (SCC) across peers'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'Use Same Namespace Security Context Constraints (SCC) across peers'
'Use same Namespace Security Context Constraints (SCC) across peers'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool

'A Namespace with same SELinux/Annotations is automatically created on the destination cluster when the application is enrolled'
)}
isChecked={retainNamespaceSCC}
onChange={(_event, checked) => onRetainNamespaceSCCChange?.(checked)}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
onChange={(_event, checked) => onRetainNamespaceSCCChange?.(checked)}
onChange={(_event, checked) => onRetainNamespaceSCCChange(checked)}

is optional chaining required?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it is needed

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is it needed ??

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed.. sorry

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have removed the optional chaining

@raghavendra-talur raghavendra-talur left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks!

/>
</FormGroup>
<Checkbox
id="Namespace-scc"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
id="Namespace-scc"
id="namespace-scc"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@Harshvardhan-handa123
Harshvardhan-handa123 force-pushed the scc-annotation-dr-enrollment branch from 262a8c7 to 5b88db6 Compare May 26, 2026 10:51
@openshift-ci openshift-ci Bot removed the lgtm label May 26, 2026
@Harshvardhan-handa123
Harshvardhan-handa123 force-pushed the scc-annotation-dr-enrollment branch from 5b88db6 to 6a5138a Compare May 26, 2026 10:54

@SanjalKatiyar SanjalKatiyar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR only adds a checkbox to the UI. The user can select it, and the state gets stored in Redux, but then what happens next ??
I don't see any changes showing how that selection is being passed to Ramen. How is the selected value actually being conveyed ?? Where are we updating the DRPC with this information ??

@SanjalKatiyar

Copy link
Copy Markdown
Collaborator

I see changes in 2 flows: discovered-application-wizard and app-manage-policies (modal). Plz test and add screenshots for all the flows.

@bipuladh

Copy link
Copy Markdown
Contributor

/hold
Please remove this once your concerns are addressed @SanjalKatiyar

@SanjalKatiyar

SanjalKatiyar commented May 26, 2026

Copy link
Copy Markdown
Collaborator

I see changes in 2 flows: discovered-application-wizard and app-manage-policies (modal). Plz test and add screenshots for all the flows.

@vbnrh can u plz verify we are not missing any discovered app flow and these 2 flows covers everything we have in UI for all type of apps (VMs or otherwise) ??

@SanjalKatiyar

Copy link
Copy Markdown
Collaborator

/approve cancel

@Harshvardhan-handa123
Harshvardhan-handa123 force-pushed the scc-annotation-dr-enrollment branch from 6a5138a to c45e71c Compare May 26, 2026 12:09
@openshift-ci openshift-ci Bot added approved and removed lgtm labels May 26, 2026
@Harshvardhan-handa123

Copy link
Copy Markdown
Contributor Author

I see changes in 2 flows: discovered-application-wizard and app-manage-policies (modal). Plz test and add screenshots for all the flows.

Hey I have tested the flow for discovered-application-wizard, however for the app-manage-policies I don't know how do I get to that page. @vbnrh @SanjalKatiyar Can u help me out

@Harshvardhan-handa123

Copy link
Copy Markdown
Contributor Author

This PR only adds a checkbox to the UI. The user can select it, and the state gets stored in Redux, but then what happens next ??
I don't see any changes showing how that selection is being passed to Ramen. How is the selected value actually being conveyed ?? Where are we updating the DRPC with this information ??

Addressed

@Harshvardhan-handa123
Harshvardhan-handa123 force-pushed the scc-annotation-dr-enrollment branch from c45e71c to ae95668 Compare May 26, 2026 13:44
'Enable the `retainNamespaceSCCAcrossPeers` flag in the RamenConfig to automatically create namespaces with matching security context constraints (SCC) acrross peer clusters. Learn more'
)}
</Alert>
)}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plz create a common component and use at all the required places.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay

isDisabled={!retainNamespaceSCCAcrossPeers}
/>
{!retainNamespaceSCCAcrossPeers && (
<Alert

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where r select-policy-wizard-content and replication-wizard-content used ?? why we need at both places ??

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are 3 places where we need to have the checkbox:
1- replication-step.tsx : DR → Protected Applications → "Enroll discovered application" wizard → step 3: Replication
2- select-policy-wizard-content.tsx: DR → Applications/VMs→ "Manage DR policy" modal → step 1: Policy (for subscription/ApplicationSet apps)
3- replication-wizard-content.tsx: DR-> Virtual MACHINES -> "Manage DR policy" modal -> step 2: Replication(only for Discovered VMs).

CC: @vbnrh

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Its showing up in VM page. Its fine

@Harshvardhan-handa123
Harshvardhan-handa123 force-pushed the scc-annotation-dr-enrollment branch from ae95668 to 8a8f53f Compare May 26, 2026 15:25
@Harshvardhan-handa123

Copy link
Copy Markdown
Contributor Author

I see changes in 2 flows: discovered-application-wizard and app-manage-policies (modal). Plz test and add screenshots for all the flows.

Hey I have tested the flow for discovered-application-wizard, however for the app-manage-policies I don't know how do I get to that page. @vbnrh @SanjalKatiyar Can u help me out

Tested both the pages now.

Comment thread packages/mco/hooks/use-ramen-config.ts Outdated
Comment on lines +24 to +48
const raw = cm?.data?.[RAMEN_CONFIG_KEY];
if (!raw) {
return [
{} as RamenConfig,
loaded,
new Error(
`Missing key ${RAMEN_CONFIG_KEY} in ConfigMap ${RAMEN_HUB_OPERATOR_CONFIG_NAME}/${ODFMCO_OPERATOR_NAMESPACE}`
),
];
}

let ramenConfig: RamenConfig = {} as RamenConfig;
try {
ramenConfig = (yaml.load(raw) || {}) as RamenConfig;
} catch (err: any) {
return [
{} as RamenConfig,
loaded,
new Error(
`Failed to parse YAML from ConfigMap ${RAMEN_HUB_OPERATOR_CONFIG_NAME}: ${
err?.message || JSON.stringify(err)
}`
),
];
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Memoize this otherwise it will parse on every render

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

.mco-manage-policies {
&__form--width {
width: 50%;
width: fit-content;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that the other wizard flows are not having major layout shifts

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mco-manage-policies__form--width This className is only used in this wizard.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screen.Recording.2026-05-27.at.12.59.52.PM.mov

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flow looks good.

@Harshvardhan-handa123
Harshvardhan-handa123 force-pushed the scc-annotation-dr-enrollment branch from 8a8f53f to a47bc76 Compare May 27, 2026 07:16
Comment thread locales/en/plugin__odf-console.json Outdated
"Enable network file system (NFS)": "Enable network file system (NFS)",
"Enable replication": "Enable replication",
"Enable S3-compatible object storage that spans across multiple cloud providers or hybrid environments": "Enable S3-compatible object storage that spans across multiple cloud providers or hybrid environments",
"Enable the `retainNamespaceSCCAcrossPeers` flag in the RamenConfig to automatically create namespaces with matching security context constraints (SCC) across peer clusters. Learn more": "Enable the `retainNamespaceSCCAcrossPeers` flag in the RamenConfig to automatically create namespaces with matching security context constraints (SCC) across peer clusters. Learn more",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we have "Learn more" when we are not redirecting to any doc ??

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed for now

@SanjalKatiyar

Copy link
Copy Markdown
Collaborator

/hold cancel

@SanjalKatiyar

Copy link
Copy Markdown
Collaborator

/cherry-pick release-4.22

@openshift-cherrypick-robot

Copy link
Copy Markdown

@SanjalKatiyar: once the present PR merges, I will cherry-pick it on top of release-4.22 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-4.22

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@SanjalKatiyar

Copy link
Copy Markdown
Collaborator

/cherry-pick release-4.21

@openshift-cherrypick-robot

Copy link
Copy Markdown

@SanjalKatiyar: once the present PR merges, I will cherry-pick it on top of release-4.21 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-4.21

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@SanjalKatiyar

Copy link
Copy Markdown
Collaborator

/cherry-pick release-4.21-compatibility

@openshift-cherrypick-robot

Copy link
Copy Markdown

@SanjalKatiyar: once the present PR merges, I will cherry-pick it on top of release-4.21-compatibility in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-4.21-compatibility

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@Harshvardhan-handa123
Harshvardhan-handa123 force-pushed the scc-annotation-dr-enrollment branch from a47bc76 to 2e62700 Compare May 27, 2026 08:05
@bipuladh

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm label May 27, 2026
@openshift-ci

openshift-ci Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: asn1809, bipuladh, Harshvardhan-handa123, raghavendra-talur

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Harshvardhan-handa123

Copy link
Copy Markdown
Contributor Author

/retest

@SanjalKatiyar

Copy link
Copy Markdown
Collaborator

/override ci/prow/odf-console-e2e-aws

@openshift-ci

openshift-ci Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

@SanjalKatiyar: Overrode contexts on behalf of SanjalKatiyar: ci/prow/odf-console-e2e-aws

Details

In response to this:

/override ci/prow/odf-console-e2e-aws

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-merge-bot
openshift-merge-bot Bot merged commit de61aab into red-hat-storage:master May 27, 2026
5 checks passed
@openshift-cherrypick-robot

Copy link
Copy Markdown

@SanjalKatiyar: new pull request created: #2853

Details

In response to this:

/cherry-pick release-4.22

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-cherrypick-robot

Copy link
Copy Markdown

@SanjalKatiyar: #2794 failed to apply on top of branch "release-4.21":

Applying: scc-annotations-fix
Using index info to reconstruct a base tree...
M	locales/en/plugin__odf-console.json
M	packages/mco/components/discovered-application-wizard/wizard-steps/replication-step/replication-selection-helper.tsx
M	packages/mco/components/modals/app-manage-policies/style.scss
M	packages/mco/hooks/index.ts
Falling back to patching base and 3-way merge...
Auto-merging packages/mco/hooks/index.ts
CONFLICT (content): Merge conflict in packages/mco/hooks/index.ts
Auto-merging packages/mco/components/modals/app-manage-policies/style.scss
Auto-merging packages/mco/components/discovered-application-wizard/wizard-steps/replication-step/replication-selection-helper.tsx
Auto-merging locales/en/plugin__odf-console.json
CONFLICT (content): Merge conflict in locales/en/plugin__odf-console.json
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 scc-annotations-fix

Details

In response to this:

/cherry-pick release-4.21

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-cherrypick-robot

Copy link
Copy Markdown

@SanjalKatiyar: #2794 failed to apply on top of branch "release-4.21-compatibility":

Applying: scc-annotations-fix
Using index info to reconstruct a base tree...
M	locales/en/plugin__odf-console.json
M	packages/mco/components/modals/app-manage-policies/style.scss
M	packages/mco/hooks/index.ts
Falling back to patching base and 3-way merge...
Auto-merging packages/mco/hooks/index.ts
CONFLICT (content): Merge conflict in packages/mco/hooks/index.ts
Auto-merging packages/mco/components/modals/app-manage-policies/style.scss
CONFLICT (content): Merge conflict in packages/mco/components/modals/app-manage-policies/style.scss
Auto-merging locales/en/plugin__odf-console.json
CONFLICT (content): Merge conflict in locales/en/plugin__odf-console.json
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 scc-annotations-fix

Details

In response to this:

/cherry-pick release-4.21-compatibility

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants